package com.example.shardingspheredemo.model.t.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * @author Andrew Yang
 * @className BookEntity
 * @description
 * @package com.example.shardingspheredemo.model.t.entity
 * @create 2020-09-10 17:17
 */
@TableName("T_BOOK")
@Data
public class BookEntity implements Serializable {
    @TableField
    private Long id;
    @TableField("book_name")
    private String bookName;
    @TableField("price")
    private int price;

    public BookEntity(Long id, String bookName, int price) {
        this.id = id;
        this.bookName = bookName;
        this.price = price;
    }

    public BookEntity(String bookName, int price) {
        this.bookName = bookName;
        this.price = price;
    }
}
